# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年12月22日
"""
import numpy as np

price = np.array([34.5, 36, 37.8, 39, 39.8, 33.6])
number = np.array([900, 580, 230, 150, 120, 1800])
print('计算加权平均价:')
print(np.average(price, weights=number))
